<?php
/**
 *备货规则-分类规则模型,主要是用来筛选符合备货规则中的分类规则的商品
 *@author shipanpan
 */
class Backup_Model_BackupRuleFilterRule extends Model_Base {
	private $_backupRuleModel;
	public function __construct() {
		$this->db = $this->db();
		$this->writeDb = $this->db("write_db");
	}

	/**
	 * 获取某条备货规则的所有分类规则
	 * @param  int    $backupRuleId 备货规则id(backup_rule表id)
	 * @return array
	 */
	public function getByBackupRuleId(int $backupRuleId) {
		return $this->db->fetchAll("select * from b_product_backup_rule_filter_rule where backup_rule_id=?", $backupRuleId);
	}
}